package com.topchain.licenceverify.auto;

import com.topchain.licenceverify.bean.LicenceProperties;
import com.topchain.licenceverify.service.LicenceVerify;
import com.topchain.schedule.LicenceJob;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @DESCRIPTION:
 * @USER: shg
 * @DATE: 2023/4/11 15:10
 */
@Configuration
@EnableConfigurationProperties(LicenceProperties.class)
@EnableScheduling
public class LicenceVerifyAutoConfiguration {
    
    @Bean
    @ConditionalOnMissingBean(LicenceVerify.class)
    public LicenceVerify licenceVerify(){
        return new LicenceVerify();
    }
    
    @Bean
    public LicenceJob licenceJob(){
        return new LicenceJob();
    }
    
}
